{extend name="layout" /}
{block name="head"}
<script type="text/javascript">var yyuc_jspath = "__STATIC__/";</script>
<link type="text/css" href="/WdatePicker.css">
<script type="text/javascript" src="__DATEPICKER__/WdatePicker.js"></script>
<script type="text/javascript" src="__JS__/jquery.form.js"></script>
{/block}
{block name="content"}
<div class="table-margin">
    <form action="{:url($mca)}" class="form-horizontal" method="post">
        <table class="table table-bordered contact-template-form">
            <tbody>
            <tr>
                <td width="20%" align="right"><font color="red">*</font>就诊医院：</td>
                <td>
                    <input class="form-control" type="text" value="宁波鄞州第二人民医院" readonly>
                </td>
            </tr>
            <tr>
                <td width="20%" align="right"><font color="red">*</font>身份证号：</td>
                <td>
                    <input class="form-control" type="text" maxlength="18" name="user_name" oninput="value=value.replace(/[^0-9.]/g,'')" required="">
                </td>
            </tr>
            <tr>
                <td width="20%" align="right"><font color="red">*</font>注册日期：</td>
                <td>
                    <input class="form-control" type="text" name="register_time" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})" required="" readonly>
                </td>
            </tr>
            <tr>
                <tD></td>
                <td>
                    <input class="btn btn-primary" type="submit" value="添加">
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $('form').submit(function(){
            $(this).ajaxSubmit({
                success:function(res) {
                    if(1 == res.code){
                        layer.alert(res.data, {
                            title: '注册成功',
                            skin: 'layui-layer-rim',
                            closeBtn: 0,
                            anim: 4
                        }, function(index){
                            layer.close(index);
                            location.reload(true);
                        });
                    }else{
                        layer.alert(res.msg, {icon:2});
                    }
                }
            });
            return false;
        });
    });
</script>
{/block}